//
//  extra.hpp
//  shunxubiao
//
//  Created by 刘文栖 on 2017/8/2.
//  Copyright © 2017年 刘文栖. All rights reserved.
//

#ifndef extra_hpp
#define extra_hpp

#include <stdio.h>
#define InitSize 5

typedef struct {
    int *data;
    int MaxSize, length;
} SeqList;

bool Del_Min(SeqList &L, int &value);
SeqList CreateList(int n);
void Reverse(SeqList &L);
void Del_x_1(SeqList &L, int x, int n);
void PrintList(SeqList L);
bool Del_s_t(SeqList &L, int s, int t);
bool Del_s_t2(SeqList &L, int s, int t);
bool Del_Same(SeqList &L);
SeqList Merge(SeqList &L, SeqList &M);
void Reverse_List(SeqList &L, int left, int right);
void Exchange(SeqList &L, int m, int n);
void Select_Exchange_Insert(SeqList &L, int x);
int Search_M(SeqList &L);
int Find_Majority(SeqList &L);
#endif /* extra_hpp */
